import request from '@/utils/request'

export function login(data) {
  console.log(data)
  return request({
    url: 'http://localhost:8001/userservice/tb-user/login',
    method: 'post',
    /*data封装成json格式传递给后台*/
    data
  })
}
export function exportUserslist(tbUserVo) {
  return request({
    url: 'http://localhost:8001/userservice/tb-user/export',
    method: 'post',
    data: tbUserVo,
    responseType:"blob"
  })
}

export function getInfo(token) {
    return request({
      url: 'http://localhost:8001/userservice/tb-user/info',
      method: 'get',
      params: { token }
    })
  }

export function logout() {
  return request({
    url: 'http://localhost:8001/userservice/tb-user/logout',
    method: 'post'
  })
}
export function getUserList(current, size, tbUserVo) {
  console.log(tbUserVo)
  return request({
    url: `http://localhost:8001/userservice/tb-user/userAndDeptPageCon/${current}/${size}`,
    method: 'post',
    data: tbUserVo
  })
}
